package cn.sfrog.project.biz.admin.enums;



public enum BizOrderStatusEnum {

    /**
     * 待服务
     */
    PENDING_SERVICE("1", "待服务"),
    /**
     * 待支付
     */
    PENDING_PAY("2", "待支付"),
    /**
     * 待接单
     */
    PENDING_ORDER("3", "待接单"),
    /**
     * 服务中
     */
    SERVING("4", "服务中"),
    /**
     * 已完成
     */
    COMPLETED("5", "已完成"),
    /**
     * 已取消
     */
    CANCELLED("6", "已取消"),
    /**
     * 待签到
     */
    WAIT_SIGN_IN("7", "待签到");

    private String code;
    private String name;


    BizOrderStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public static BizOrderStatusEnum getInstance(String code) {
        BizOrderStatusEnum[] values = values();
        for (BizOrderStatusEnum bizOrderStatusEnum : values) {
            if (bizOrderStatusEnum.code.equals(code)) {
                return bizOrderStatusEnum;
            }
        }
        return null;
    }
}
